﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tanmia.Warehouse.Core;
using FluentNHibernate.Mapping;

namespace Tanmia.Warehouse.NHibernateRepository.Mapping
{
    public class AdjustmentNoteMap : BaseNoteMap<AdjustmentNote>
    {
        public AdjustmentNoteMap()
        {
            Table("AdjustmentNote");

            Id(x => x.AdjustmentNoteID).Not.Nullable().GeneratedBy.Identity().Unique();
            References(x => x.Store, "StoreID").Not.Nullable();
            HasMany<StockMovement>(x => x.Details).KeyColumn("AdjustmentNoteID").Inverse();
        }
    }
}
